﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NHModel.Entities
{
    public class MsgContent
    {
        #region Member Variables

        protected long _id;
        protected string _msg;
        protected DateTime _createTime;
        protected MsgEmail _eamil;


        #endregion

        #region Constructors

        public MsgContent() { }

        public MsgContent(string msg, DateTime createTime, MsgEmail eamil)
        {
            this._msg = msg;
            this._createTime = createTime;
            this._eamil = eamil;
        }

        #endregion

        #region Public Properties
        
        public virtual long Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public virtual string Msg
        {
            get { return _msg; }
            set
            {
                if (value != null && value.Length > 500)
                    throw new ArgumentOutOfRangeException("Invalid value for Msg", value, value.ToString());
                _msg = value;
            }
        }

        public virtual DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }

        public virtual MsgEmail Eamil
        {
            get { return _eamil; }
            set { _eamil = value; }
        }


        #endregion

    }
}
